package com.cloudkinto.enumType.order.outbound;

import com.baomidou.mybatisplus.core.enums.IEnum;
import com.cloudkinto.vo.common.CommonKvVo;

import java.util.ArrayList;

/**
 * 出库单状态库
 *
 * @author long
 */

public enum OutboundTypeEnum implements IEnum<Integer> {

    /**
     *
     */
    one(1, "一件代发"),
    two(2, "批发单");

    private final Integer value;

    private final String desc;

    OutboundTypeEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    @Override
    public Integer getValue() {
        return value;
    }

    public static ArrayList<CommonKvVo> getInboundTypeList() {
        ArrayList<CommonKvVo> list = new ArrayList<>();
        for (OutboundTypeEnum inboundType : values()) {
            list.add(
                    CommonKvVo.builder()
                            .label(inboundType.desc)
                            .value(inboundType.getValue())
                            .build()
            );
        }
        return list;
    }
}
